﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类tRightGroupModule
	/// </summary>
	[Serializable]
	public class tRightGroupModule : Entity 
	{ 
		 public tRightGroupModule() 
            : base("tRightGroupModule") 
        { 

        }


		#region Model
		private int _GroupModuleID;
		private string _ModuleID;
		private string _ModuleVerb;
		private string _GroupCode;
	 
		/// <summary>
		/// 
		/// </summary>
		public int GroupModuleID
		{
			get{ return _GroupModuleID; }
			set
			{
				this.OnPropertyValueChange(_.GroupModuleID,_GroupModuleID,value);
				this._GroupModuleID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleID
		{
			get{ return _ModuleID; }
			set
			{
				this.OnPropertyValueChange(_.ModuleID,_ModuleID,value);
				this._ModuleID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleVerb
		{
			get{ return _ModuleVerb; }
			set
			{
				this.OnPropertyValueChange(_.ModuleVerb,_ModuleVerb,value);
				this._ModuleVerb = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string GroupCode
		{
			get{ return _GroupCode; }
			set
			{
				this.OnPropertyValueChange(_.GroupCode,_GroupCode,value);
				this._GroupCode = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.GroupModuleID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.GroupModuleID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.GroupModuleID,
				_.ModuleID,
				_.ModuleVerb,
				_.GroupCode
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_GroupModuleID,
				_ModuleID,
				_ModuleVerb,
				_GroupCode
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "GroupModuleID":
                    this._GroupModuleID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ModuleID":
                    this._ModuleID = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleVerb":
                    this._ModuleVerb = DataHelper.ConvertValue<string>(value);
                    break; 
				case "GroupCode":
                    this._GroupCode = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "GroupModuleID":
                    return this._GroupModuleID; 
				case "ModuleID":
                    return this._ModuleID; 
				case "ModuleVerb":
                    return this._ModuleVerb; 
				case "GroupCode":
                    return this._GroupCode; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","tRightGroupModule");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GroupModuleID = new Field("GroupModuleID","tRightGroupModule","GroupModuleID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleID = new Field("ModuleID","tRightGroupModule","ModuleID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleVerb = new Field("ModuleVerb","tRightGroupModule","ModuleVerb");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GroupCode = new Field("GroupCode","tRightGroupModule","GroupCode");
		}
		#endregion

 
	}
}

